package com.ruoyi.system.service.impl.biz;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.biz.BmClubMoneyMapper;
import com.ruoyi.system.domain.biz.BmClubMoney;
import com.ruoyi.system.service.biz.IBmClubMoneyService;
import com.ruoyi.common.core.text.Convert;

/**
 * 俱乐部基金Service业务层处理
 * 
 * @author xiangzhipeng
 * @date 2022-11-29
 */
@Service
public class BmClubMoneyServiceImpl implements IBmClubMoneyService 
{
    @Autowired
    private BmClubMoneyMapper bmClubMoneyMapper;

    /**
     * 查询俱乐部基金
     * 
     * @param id 俱乐部基金主键
     * @return 俱乐部基金
     */
    @Override
    public BmClubMoney selectBmClubMoneyById(String id)
    {
        return bmClubMoneyMapper.selectBmClubMoneyById(id);
    }

    /**
     * 查询俱乐部基金列表
     * 
     * @param bmClubMoney 俱乐部基金
     * @return 俱乐部基金
     */
    @Override
    public List<BmClubMoney> selectBmClubMoneyList(BmClubMoney bmClubMoney)
    {
        return bmClubMoneyMapper.selectBmClubMoneyList(bmClubMoney);
    }

    /**
     * 新增俱乐部基金
     * 
     * @param bmClubMoney 俱乐部基金
     * @return 结果
     */
    @Override
    public int insertBmClubMoney(BmClubMoney bmClubMoney)
    {
        bmClubMoney.setCreateTime(DateUtils.getNowDate());
        return bmClubMoneyMapper.insertBmClubMoney(bmClubMoney);
    }

    /**
     * 修改俱乐部基金
     * 
     * @param bmClubMoney 俱乐部基金
     * @return 结果
     */
    @Override
    public int updateBmClubMoney(BmClubMoney bmClubMoney)
    {
        bmClubMoney.setUpdateTime(DateUtils.getNowDate());
        return bmClubMoneyMapper.updateBmClubMoney(bmClubMoney);
    }

    /**
     * 批量删除俱乐部基金
     * 
     * @param ids 需要删除的俱乐部基金主键
     * @return 结果
     */
    @Override
    public int deleteBmClubMoneyByIds(String ids)
    {
        return bmClubMoneyMapper.deleteBmClubMoneyByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除俱乐部基金信息
     * 
     * @param id 俱乐部基金主键
     * @return 结果
     */
    @Override
    public int deleteBmClubMoneyById(String id)
    {
        return bmClubMoneyMapper.deleteBmClubMoneyById(id);
    }
}
